#include<iostream>
#include<cstdio>
using namespace std;
int n,a[100001],d[100001],t[100001],ans,r,top;
int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    ios::sync_with_stdio(0);cin.tie(0);
    cin>>n;ans=n;
    for(int i=1;i<=n;i++)
    {
        cin>>a[i],t[a[i]]++,r=max(r,a[i]);
    }
    for(int i=1;i<=r;i++) if(t[i]!=0) d[++top]=t[i];
    for(int i=2;i<=top;i++)
    {
        if(d[i-1]<=d[i]) ans-=d[i-1];
        else ans-=d[i],d[i]=d[i-1];
    }
    cout<<ans;
    return 0;
}
